Skip to content

draft-IERC4337: split EntryPoint interfaces into IEntryPointStake and IEntryPointDeposit [WIP] #5806

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

gonzaotc
Copy link
Contributor

Currently, IEntryPointStake contains both the methods defined in the ERC for managing stakes and also for managing deposits, whose fundamental difference would be better reflected by this new interface organization.

The ERC-4337 specification explicitly states: "the deposit (for paying gas fees) is separate from the stake (which is locked)"

Note that there are Paymasters which require the IEntryPointDeposit interface (obligatory part of the standard) but may not require the IEntryPointStake interface, which is optional. The new interface organization allows paymaster builders to import only the interface components they need.

@gonzaotc gonzaotc requested a review from a team as a code owner July 20, 2025 22:15
Copy link

changeset-bot bot commented Jul 20, 2025

⚠️ No Changeset found

Latest commit: c4e2d4c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@gonzaotc gonzaotc marked this pull request as draft July 20, 2025 22:18
@gonzaotc gonzaotc changed the title draft-IERC4337: split EntryPoint interfaces into IEntryPointStake and IEntryPointDeposit draft-IERC4337: split EntryPoint interfaces into IEntryPointStake and IEntryPointDeposit [WIP] Jul 21, 2025
@Amxx
Copy link
Collaborator

Amxx commented Jul 21, 2025

For the record, This entrypoint interface is split in sections that follows the implementation of the canonical entryopoint

The entrypoint inherits from helper contracts that are StakeManager and NonceManager. The IEntryPointNonces and IEntryPointStake interfaces correspond to what these modules implement/expose. In the reference implementation, these interfaces are called IStakeManager and INonceManager.


With this context in mind, I think the right move would be to just get rid of these "auxiliary" interfaces, and put everything directly in IEntrypoint.

That being said, the current definition of IEntryPointStake (and IEntryPointNonces) is something we should avoid breaking, unless really necessary. This file being draft means we don't provide the same guarantees as other files, but it also doesn't mean we don't need a strong reason to change things.

I'm not in favor of doing this change now, but I am in favor of discussing what we really want to do with this interface for 6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants